<template>
  <div>
    <h1 @click="dog.name+='!'">{{ dog.name }}</h1>
    <h1>{{ dog.age }}</h1>
    <h1 @click="addFood">{{ dog.foods}}</h1>
  </div>
</template>

<script setup lang="ts">
import { reactive } from "vue";

let dog=reactive({
  name:'哈士奇',
  age:3,
  foods:['西兰花','骨头','鸡腿']
})
let addFood=()=>{
  dog.foods.push('大骨头')
}
</script>
<style>

</style>